@src: '/assets/img/';
@ImgVersion: '?v=0.0.2';
@textColor:#2C2927;
@bgReds:linear-gradient(161deg, #FF688A, #FF3F6B);
//主题色
.bgImgUrl(@url) {
  background-image: url("@{src}@{url}");
}

.bgImg(@url,@size:cover,@position:center,@repeat:no-repeat) {
  background-image: url("@{src}@{url}@{ImgVersion}");
  background-position: @position;
  background-repeat: @repeat;
  background-size: @size;
}

//绝对定位居中设置
.positionCenter(@w:0,@h:0) {
  position: absolute;
}

//水平居中
.positionCenter(@w:0,@h:0) when (@w>0) {
  left: 50%;
  margin-left: unit(-(@w/2), px);
}

//垂直居中
.positionCenter(@w:0,@h:0) when (@h>0) {
  top: 50%;
  margin-top: unit(-(@h/2), px);
}

//正方形
.squareBox(@b,@scale:1,@radius:0) {
  width: unit((@b/@scale), px);
  height: unit((@b/@scale), px);
}

.squareBox(@b,@scale:1,@radius:0) when (@radius>0){
  width: unit((@b/@scale), px);
  height: unit((@b/@scale), px);
  border-radius: @radius;
}

//自定义尺寸
.boxSize(@w,@h,@scale:1) {
  width: unit((@w/@scale), px);
  height: unit((@h/@scale), px);
}
